<template>
	<div class="pages">
		<div class="item_detail">
			<div class="top">
				<div class="item1">工厂详情</div>
				<div class="item2">
					<el-button type="primary" @click="" size="small" @click="$router.go(-1)">返回</el-button>
				</div>
			</div>
			<div class="item_table">
				<table width="100%" class="table">
					<tr>
						<td class="tit">登录账号</td>
						<td>{{dataForm.username}}</td>
						<td class="tit">工厂名称</td>
						<td>{{dataForm.name}}</td>
						<td class="tit">工厂实际住所</td>
						<td>{{dataForm.address}}</td>
					</tr>
					<tr>
						<td class="tit">联系人</td>
						<td>{{dataForm.contact}}</td>
						<td class="tit">联系电话</td>
						<td>{{dataForm.mobile}}</td>
						<td class="tit">状态</td>
						<td>{{dataForm.status==1?'正常':'禁用'}}</td>
					</tr>

					<tr>
						<td class="tit">备注</td>
						<td colspan="5">{{dataForm.remarks}}</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				dataForm: {
					id: ''
				},
			}
		},
		components: {},
		methods: {},
		created() {
			this.dataForm.id = this.$route.query.id
			this.$loading()
			this.$http.post(`/api/factory/detail`, {
				id: this.dataForm.id
			}).then(res => {
				this.$closeLoading()
				this.dataForm = res.result
			})
		}
	}
</script>